home *** CD-ROM | disk | FTP | other *** search
/ Plug-In Power Pack for Netscape Communicator / Plug-In Power Pack for Netscape Communicator.iso / plugins / dataviews / include / grfundecl.h < prev    next >
C/C++ Source or Header  |  1997-05-08  |  12KB  |  347 lines

  1. /*
  2.  * GRfundecl.h
  3.  * GR routine declarations
  4.  *
  5.  */
  6.  
  7. #ifndef GRFUNDECL_H
  8. #define GRFUNDECL_H
  9.  
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif /* __cplusplus */
  13.  
  14. #include "std.h"
  15. #include "dvstd.h"
  16. #include "dvGR.h"
  17. #include "GRtextarray.h"
  18.  
  19.  
  20. /***
  21. *** 
  22. ***/
  23.  
  24.  
  25.  
  26.  
  27. /* GR/GRcolor.c */
  28. BOOLPARAM GRs_color_table V_P_((COLOR_TABLE *color_table));
  29. BOOLPARAM GRg_color_table V_P_((COLOR_TABLE **color_table));
  30. BOOLPARAM GRg_real_color_tab V_P_((COLOR_TABLE **color_table));
  31. BOOLPARAM GRappend_color V_P_((RGB_SPEC *rgb));
  32. BOOLPARAM GRdrop_color V_P_((void));
  33. BOOLPARAM GRs_index_color V_P_((int index, RGB_SPEC *rgb));
  34. BOOLPARAM GRs_index_rw V_P_((int index, BOOLPARAM rw));
  35. BOOLPARAM GRcolor V_P_((int color_table_index));
  36. BOOLPARAM GRbackcolor V_P_((int index));
  37. void GRSetColors V_P_((void));
  38. void GRResetColors V_P_((void));
  39. BOOLPARAM GRrgbtoindex V_P_((int r,  int g,  int b,  int *index));
  40. BOOLPARAM GRindextorgb V_P_((int index,  int *r,  int *g,  int *b));
  41. ULONG GRg_pixel V_P_((ULONG index));
  42. BOOLPARAM GRpixeltorgb V_P_((ULONG pixel,  UBYTE *red,
  43.      UBYTE *green,  UBYTE *blue));
  44.  
  45. /***
  46. *** 
  47. ***/
  48.  
  49.  
  50.  
  51.  
  52. /* GR/GRcursor.c */
  53. BOOLPARAM GRcr_record V_P_((FILE *file));
  54. BOOLPARAM GRcr_grecord V_P_((FILE **file));
  55. BOOLPARAM GRcr_playback V_P_((FILE *file));
  56. BOOLPARAM GRcr_gplayback V_P_((FILE **file));
  57. BOOLPARAM GRunlocate V_P_((int key, DV_POINT *location));
  58. int GRlocate V_P_((DV_POINT *p));
  59. BOOLPARAM GRcr_open_poll V_P_((void));
  60. BOOLPARAM GRcr_close_poll V_P_((void));
  61. BOOLPARAM GRcr_event V_P_((int new_eventflag,
  62.      int *current_eventflag));
  63. BOOLPARAM GRcr_status V_P_((DV_BOOL *onoff,  DV_POINT *pt,
  64.      ADDRESS *raster));
  65. BOOLPARAM GRcr_define V_P_((ADDRESS raster));
  66. int GRcr_poll V_P_((DV_POINT *p));
  67. BOOLPARAM GRwe_mask V_P_((ULONG mask, ULONG altmask));
  68. BOOLPARAM GRwe_gmask V_P_((ULONG *mask,    ULONG *wmask));
  69. BOOLPARAM GRwe_poll V_P_((int mode,  int source,  WINEVENT *we));
  70. BOOLPARAM GRwe_state V_P_((WINEVENT *we));
  71. BOOLPARAM GRwe_dispatch_event V_P_((WINEVENT *we));
  72. BOOLPARAM GRwe_convert V_P_((ADDRESS event, WINEVENT *we));
  73.  
  74. /***
  75. *** 
  76. ***/
  77.  
  78.  
  79.  
  80.  
  81. /* GR/GR.c */
  82. BOOLPARAM GRopen V_P_((char dev_name[], int *dev_num));
  83. BOOLPARAM GRclose V_P_((int dev_num));
  84. BOOLPARAM GRselect V_P_((int dev_num));
  85. BOOLPARAM GRcurrent_dev V_P_((int *curr_device));
  86. BOOLPARAM GRaspect_ratio V_P_((int *n, int *d));
  87. BOOLPARAM GRdepth V_P_((int *depth));
  88. BOOLPARAM GRflush V_P_((void));
  89. BOOLPARAM GRend_frame V_P_((void));
  90. BOOLPARAM GRvcs_to_scs V_P_((DV_POINT *input_p,  DV_POINT *screen_p));
  91. BOOLPARAM GRscs_to_vcs V_P_((DV_POINT *input_p,  DV_POINT *virtual_p));
  92. BOOLPARAM GRsetfio V_P_((char *devname,  FILE *inputfio,
  93.      FILE *outputfio));
  94. BOOLPARAM GRsetlogfio V_P_((FILE *fio));
  95. BOOLPARAM GRgetfio V_P_((char *devname,  FILE **inputfio,
  96.      FILE **outputfio));
  97. BOOLPARAM GRgetlogfio V_P_((FILE **fio));
  98. BOOLPARAM GRviewport V_P_((DV_POINT *llp, DV_POINT *urp));
  99. BOOLPARAM GRg_viewport V_P_((DV_POINT *llp, DV_POINT *urp));
  100. LONG GRmaskplanes V_P_((LONG mask));
  101. BOOLPARAM GRreset V_P_((void));
  102. BOOLPARAM GRset V_P_((ULONG i, ...));
  103. BOOLPARAM GRget V_P_((ULONG i, ...));
  104. BOOLPARAM GRopen_set V_P_((char dev_name[],  int *dev_num,  ...));
  105. BOOLPARAM GRprint_start(ADDRESS pr_struct);
  106. BOOLPARAM GRprint_end();
  107. BOOLPARAM GRprint_reset();
  108. ADDRESS GRprint_set(int first_arg, va_list argptr);
  109. void GR_pr_toggle();
  110.  
  111. /***
  112. *** 
  113. ***/
  114.  
  115.  
  116.  
  117.  
  118. /* GR/GRIDSfrmt.c */
  119. BOOLPARAM GRIDSformat V_P_((FILE *infile, FILE *outfile));
  120.  
  121. /* GR/GRblogplay.c */
  122. BOOLPARAM GRblogplayback V_P_((FILE *logfile,  int device_map[]));
  123.  
  124. /* GR/GRcurve.c */
  125. int GRcubprecision V_P_((int max_deviation));
  126. int GRcubsize V_P_((register DV_POINT *a));
  127. int GRcubpts V_P_((register DV_POINT a[4],  DV_POINT *ptbuf,  int bufsize));
  128. void GRcubdraw V_P_((DV_POINT a[4],  int linepattern,  int linewidth));
  129. void GRbeztocub V_P_((register DV_POINT *bez,  register DV_POINT *cub));
  130. void GRcubtobez V_P_((register DV_POINT *cub,  register DV_POINT *bez));
  131. void GRbezsplit V_P_((register DV_POINT *inbez,  register DV_POINT *outbez0,
  132.      register DV_POINT *outbez1));
  133. void GRbsptocub V_P_((register DV_POINT *bsp,  register DV_POINT *cub));
  134. int GRbspcubics V_P_((DV_POINT *cparray,  int numcps,  int end_conditions,
  135.      register DV_POINT (*cubics)[4]));
  136. int GRbspdraw V_P_((DV_POINT *cps,  int numcps,  int end_conditions,
  137.      int linepattern,  int linewidth));
  138.  
  139. /* GR/GRdata.c */
  140.  
  141. /* GR/GRdevices.c */
  142. BOOLPARAM GRisdevopen V_P_((char *device_name));
  143. BOOLPARAM GRdevnum V_P_((char *device_name,  int *device_ordinal));
  144. BOOLPARAM GRdevname V_P_((int device_ordinal,  char **device_name));
  145.  
  146. /* GR/GRdumprect.c */
  147. BOOLPARAM GRdumprect V_P_((register DV_POINT *llp,  register DV_POINT *urp,
  148.      FILE *file));
  149. BOOLPARAM GRdumpscreen V_P_((char *filename));
  150.  
  151. /* GR/GRlogplay.c */
  152. BOOLPARAM GRlogplayback V_P_((FILE *logfile,  int device_map[]));
  153.  
  154. /* GR/GRlogxlate.c */
  155. void GRexpand V_P_((FILE *binfile, FILE *asciifile));
  156. void GRcompact V_P_((FILE *asciifile, FILE *binfile));
  157.  
  158. /* GR/GRpalette.c */
  159. BOOLPARAM GRpaldraw V_P_((register RECTANGLE *palette_vp));
  160. int GRpalpick V_P_((RECTANGLE *echovp, LONG *color_arg));
  161. int GRpalfnpick V_P_((GRPALPICKFUNPTR fun,  RECTANGLE *echovp,
  162.               LONG *color_arg));
  163. int GRpalpoll V_P_((LONG *color_arg));
  164. void GRpalloc V_P_((DV_POINT *pt, LONG *color_arg));
  165. BOOLPARAM GRpalcrmove V_P_((LONG color));
  166. LONG GRpalhas_pt V_P_((DV_POINT *pt));
  167.  
  168. /* GR/GRplrvec.c */
  169. BOOLPARAM GRplrvector V_P_((register DV_POINT *center,  PLR_POINT *p0,
  170.      PLR_POINT *p1));
  171.  
  172. /* GR/GRrqp.c */
  173. int GRrqpprecision V_P_((int max_deviation));
  174. int GRrqpsize V_P_((DV_POINT cp[3], float *k));
  175. int GRrqppts V_P_((DV_POINT cp[3],  float *k,  register DV_POINT *ptbuf,
  176.      int bufsize));
  177. void GRrqpdraw V_P_((DV_POINT cp[3],  float *k,  int linepattern,
  178.      int linewidth));
  179. void GRrqpsplit V_P_((DV_POINT incp[3],  float *ink,  DV_POINT outcp1[3],
  180.      float *outk1,  DV_POINT outcp2[3],  float *outk2));
  181.  
  182. /***
  183. *** 
  184. ***/
  185.  
  186.  
  187.  
  188.  
  189. /* GR/GRprim.c */
  190. BOOLPARAM GRmove V_P_((DV_POINT *p));
  191. BOOLPARAM GRvector V_P_((DV_POINT *p));
  192. BOOLPARAM GRconcat_vector V_P_((DV_POINT pt_list[], int num));
  193. BOOLPARAM GRmove_and_vector V_P_((DV_POINT *p1, DV_POINT *p2));
  194. BOOLPARAM GRrectangle V_P_((DV_POINT *p1, DV_POINT *p2));
  195. BOOLPARAM GRf_rectangle V_P_((DV_POINT *p1, DV_POINT *p2));
  196. BOOLPARAM GRcircle V_P_((DV_POINT *p, int radius));
  197. BOOLPARAM GRf_circle V_P_((DV_POINT *p, int radius));
  198. BOOLPARAM GRpolygon V_P_((DV_POINT pt_list[], int num));
  199. BOOLPARAM GRf_polygon V_P_((DV_POINT pt_list[], int num));
  200. BOOLPARAM GRsector V_P_((DV_POINT *p,  int radius,  int angle,  int delta));
  201. BOOLPARAM GRf_sector V_P_((DV_POINT *p,  int radius,  int angle,
  202.      int delta));
  203. BOOLPARAM GRerase V_P_((void));
  204. BOOLPARAM GRdraw_background V_P_((RECTANGLE *svp));
  205. BOOLPARAM GRline V_P_((DV_POINT *p, int type, int width));
  206. BOOLPARAM GRmv_and_line V_P_((DV_POINT *p1,  DV_POINT *p2,  int type,
  207.      int width));
  208. BOOLPARAM GRconcat_line V_P_((DV_POINT pt_list[],  int num,  int type,
  209.      int width));
  210. BOOLPARAM GR_current_point V_P_((DV_POINT *p));
  211. BOOLPARAM GRcur_point V_P_((DV_POINT *p));
  212.  
  213. /***
  214. *** 
  215. ***/
  216.  
  217.  
  218.  
  219.  
  220. /* GR/GRraster.c */
  221. BOOLPARAM GRrasdraw V_P_((ADDRESS raster, DV_POINT *ll));
  222. BOOLPARAM GRrasdrawpart V_P_((ADDRESS raster,  DV_POINT *ll,
  223.      RECTANGLE *portion));
  224. BOOLPARAM GRrasget V_P_((DV_POINT *ll,  int width,  int height,
  225.      ADDRESS *raster));
  226. BOOLPARAM GRrasfree V_P_((ADDRESS raster));
  227. BOOLPARAM GRrasvalid V_P_((ADDRESS raster));
  228. BOOLPARAM GRrasmove V_P_((DV_POINT *ll,  DV_POINT *ur,  DV_POINT *dest));
  229. BOOLPARAM GRrasquery V_P_((int question));
  230. BOOLPARAM GRrascreate V_P_((int width,  int height,  ADDRESS *raster));
  231. BOOLPARAM GRrassize V_P_((ADDRESS raster,  int *width,  int *height,
  232.      int *depth));
  233. BOOLPARAM GRrassave V_P_((ADDRESS raster, FILE *file));
  234. BOOLPARAM GRrasrestore V_P_((FILE *file, ADDRESS *raster));
  235. BOOLPARAM GRrasspix V_P_((ADDRESS raster,  DV_POINT *point,  LONG value));
  236. LONG GRrasgpix V_P_((ADDRESS raster, DV_POINT *point));
  237. BOOLPARAM GRrasspixels V_P_((ADDRESS raster,  ADDRESS values,
  238.      int value_unit));
  239. BOOLPARAM GRrassmask V_P_((ADDRESS raster,  ADDRESS values));
  240. BOOLPARAM GRrasspxrp V_P_((ADDRESS raster,  PIXREP *pPixrep,
  241.      COLOR_XFORM *xform));
  242. BOOLPARAM GRrasgpxrp V_P_((PIXREP *pPixrep,  ADDRESS raster));
  243. BOOLPARAM GRrassmaskpxrp V_P_((ADDRESS raster,  PIXREP *pPixrep,
  244.      COLOR_XFORM *pxform));
  245.  
  246. /***
  247. *** 
  248. ***/
  249.  
  250.  
  251.  
  252.  
  253. /* GR/GRtxtarray.c */
  254. ADDRESS GRtaCreate V_P_((ULONG spec_flag,  DV_POINT *pt,
  255.      DV_POINT *szscr,  CHAR_POSITION *szchr,  int ch_ndx,  int *colors));
  256. BOOLPARAM GRtaDestroy V_P_((ADDRESS ptap));
  257. int GRtaGetWidth V_P_((ADDRESS tap));
  258. int GRtaGetHeight V_P_((ADDRESS tap));
  259. BOOLPARAM GRtaBox V_P_((ADDRESS ptap, RECTANGLE *r));
  260. BOOLPARAM GRtaGetSize V_P_((ADDRESS tap, RECTANGLE *r));
  261. BOOLPARAM GRtaGetDim V_P_((ADDRESS ptap, DV_POINT *p));
  262. BOOLPARAM GRtaGetPosition V_P_((ADDRESS ptap,  DV_POINT *p,  int *row,
  263.      int *col));
  264. BOOLPARAM GRtaGetCursorPosition V_P_((ADDRESS ptap,  int *row,
  265.      int *col));
  266. BOOLPARAM GRtaShowCursor V_P_((ADDRESS ptap,  int makevisible));
  267. BOOLPARAM GRtaMoveCursor V_P_((ADDRESS ptap,  int row,  int col));
  268. BOOLPARAM GRtaWrite V_P_((ADDRESS ptap,  int row,  int col,  int ncols,
  269.      char *string,  int color));
  270. BOOLPARAM GRtaWrtCells V_P_((register ADDRESS ptap,  int row,  int col,
  271.      register CHAR_CELL *cells,  int ncols));
  272. BOOLPARAM GRtaGetCells V_P_((register ADDRESS ptap,  int row,  int col,
  273.      register CHAR_CELL *cells,  int ncols));
  274. BOOLPARAM GRtaCharFill V_P_((register ADDRESS ptap,  CHAR_RECT *rect,
  275.      int chr,  int color));
  276. BOOLPARAM GRtaSlide V_P_((register ADDRESS ptap,  CHAR_RECT *rect,
  277.      int direction,  int distance));
  278. BOOLPARAM GRtaGetScreenVp V_P_((ADDRESS ptap,  CHAR_RECT *srectp,
  279.      RECTANGLE *vp));
  280. BOOLPARAM GRtaGetString V_P_((ADDRESS ptap,  char *buf,  int bufsiz,
  281.      int frow,  int fcol,  int trow,  int tcol));
  282. BOOLPARAM GRtaMove V_P_((ADDRESS ptap,  int xoff,  int yoff));
  283. BOOLPARAM GRtaRefresh V_P_((ADDRESS ptap,  CHAR_RECT *crect));
  284. void GRtaClip V_P_((ADDRESS tap,  RECTANGLE *invp,
  285.      RECTANGLE **outvps));
  286.  
  287. #define GRtaBeep() putchar('\07' /* BELL */);
  288.  
  289. /***
  290. *** 
  291. ***/
  292.  
  293. /* GR/GRsftext.c */
  294.  
  295. BOOLPARAM GRgetsfont V_P_((ADDRESS curr_font, unsigned int *curr_tag ));
  296. BOOLPARAM GRgetsfontinfo V_P_((ADDRESS req_fontid, ADDRESS *sfont_desc ));
  297. BOOLPARAM GRsfontfree V_P_((ADDRESS font_id, unsigned int fonttag ));
  298. ADDRESS GRsfontset V_P_((ADDRESS font_id, unsigned int *fonttag, 
  299.                           ADDRESS sfont_desc ));
  300. BOOLPARAM GRsftext V_P_((char *textp));
  301. BOOLPARAM GRsfpt_to_scs(ADDRESS req_fontid, unsigned int tag, 
  302.                         float *width, float *height);
  303.  
  304.  
  305.  
  306. /* GR/GRtext.c */
  307. BOOLPARAM GRtext V_P_((char *textp));
  308. BOOLPARAM GRtextsize V_P_((char *textp,  int *xsize,  int *ysize));
  309. BOOLPARAM GRfont V_P_((int font_type));
  310. BOOLPARAM GRch_size V_P_((int xsize, int ysize));
  311. BOOLPARAM GRg_ch_size V_P_((int *xsize, int *ysize));
  312.  
  313. /***
  314. *** 
  315. ***/
  316.  
  317.  
  318.  
  319.  
  320. /* GR/GRvtext.c */
  321. void GRgetvfontchar V_P_((int ch, register char *buf));
  322. void GRvtext V_P_((UBYTE *str));
  323. BOOLPARAM GRvfont V_P_((int nfont));
  324. BOOLPARAM GRsavevfont V_P_((int nfont,  char *filename,  int format));
  325. int GRvfontname V_P_((char *fontname));
  326. void GRvtmatrix V_P_((register float tmatrix[2][2]));
  327. void GRvspace V_P_((double charspace, double linespace));
  328. BOOLPARAM GRfreevfont V_P_((int nfont));
  329. void GRgetvnorm V_P_((int pixheight, float *normfactor));
  330. void GRgetvspace V_P_((float *charspace,  float *linespace));
  331. void GRgetvmaxwidth V_P_((UBYTE *instr, int *x, int *y));
  332. BOOLPARAM GRgetvwidth V_P_((UBYTE *instr, int *x, int *y));
  333. void GRgetvheight V_P_((int nlines, int *x, int *y));
  334. char *GRgetvfontname V_P_((int nfont));
  335. int GRgetvfont V_P_((void));
  336.  
  337.  
  338.  
  339. #ifdef __cplusplus
  340. }
  341. #endif /* __cplusplus */
  342.  
  343. #endif /* GRFUNDECL_H */
  344.  
  345.  
  346.  
  347.